home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-03-14 | 2.4 KB | 68 lines | [TEXT/R*ch] |
- // Copyright (c) 1996-1997 Jeremy Wyld. All rights reserved.
- /* For best viewing pleasure set the font to: Courier 10pt with 3 space tabs
-
-
- Project Overview
-
- This auto part adds items to the routing menu. It overrides a method in root that may cease
- to exist someday, thus possibly killing this hack. Don't blame me! Playing with undocumented
- "features" isn't for the light-hearted. Extra items can be added, or those I provide may be
- yanked. Read on to figure how to do it yourself.
-
- For question or comments, send mail to: wyld@newton.apple.com
-
-
- Files
-
- Graphics.f Loads graphics used in the routing frames.
-
- MiscFunctions.f Contains the definition for general functions used in the
- rest of the files.
-
- RouteFrames.f Defines the route frames to be added to the routing menu.
-
- GetRouteScripts.f Definition for the "new" :GetRouteScripts().
-
- InstallScript.f InstallScript() definition for this auto part.
-
- RemoveScript.f RemoveScript() definition for this auto part.
-
-
- Adding More
-
- In order to add more items to the routing menu, I've supplied a few compile time functions.
- These include AddRouteFrame(), AddRouteItem(), AddOpenItem(), and AddSeparator(). Place
- the calls to these functions in RouteFrames.f (this keeps them all together in one place).
-
-
- AddRouteFrame()
-
- This function takes one argument, the actual frame to be added to the routing menu. For
- documentation on routing frames, see "NPG - Comm" page 2-49 and page 2-50.
-
-
- AddRouteItem()
-
- This function takes three arguments: title, icon, and routescript, respectively. This
- function then makes a routing frame with these arguments and calls AddRouteFrame() with
- this new frame. The routing frame it creates looks as such:
-
- {
- title: title, // Name to show up in the menu.
- icon: icon, // As that returned by GetPICTAsBits()
-
- routeScript: routescript // Function to be called.
- }
-
-
- AddOpenItem()
-
- This function takes three arguments, the title, the icon and the symbol of the item to
- open in root (e.g. 'iobox). It builds a frame similar to the one above but with a
- method that opens the root item.
-
-
- AddSeparator()
-
- This function takes no arguments and adds a pick separator (dotted line) to the menu.
- */